import {
  get,
  post,
  postUrlencoded,
  formDataType
} from "../requestApi/request";
const API = {
  // 获取便民服务信息
  Apiconvenienceservicesinfo: "/api/convenience-services/info",
  // 资源管理
  Apiresourcelistinfo: "/api/resource-list/info",
  // 清单管理
  Apidemandistinfo: "/api/demand-list/info",
  // 志愿项目
  Apivolunteerprojectinfo: "/api/volunteer-project/info",
  // 求职人员信息
  Apijobhuntinguserinfo: "/api/job-hunting-user/info",
  // 岗位信息
  Apipostinfo: "/api/post/info",
  // 岗位信息-人员匹配
  ApipjobhuntinguserList: "/api/job-hunting-user/list",
  // 党群新闻
  Apipartynewsinfo: "/api/party-news/info",
  // 社会主义核心价值观新闻
  Apisocialistvaluesinfo: "/api/socialist-values/info",
  // 三会一课
  Apithreemeetonelessoninfo: "/api/three-meet-one-lesson/info",
  // 民主生活会
  Apidemocraticlifemeetinginfo: "/api/democratic-life-meeting/info",
  // 组织生活会
  Apiorgfemeetinginfo: "/api/org-fe-meeting/info",
  // 支部活动
  Apibranchactivityinfo: "/api/branch-activity/info",
  // 示范典型
  Apidemonstrationtypicalinfo: "/api/demonstration-typical/info",
  // 党建要问-新闻
  Apipartybuildingnewsinfo: "/api/party-building-news/detail",
  // 四支队伍
  Apiteamworkinfo: "/api/team-work/info",
  // 政策文件
  Apipolicydocinfo: "/api/policy-doc/info",
  // 红领党建
  Apiredpartybuildinginfo: "/api/red-party-building/info",
  // 单位简介-非公
  Apinotpartyunitinfo: "/api/not-party-unit/info",
  // 街道联系会议简介
  Apistreetjointmeetinginfo: "/api/street-joint-meeting/info",
  // 街道联系会议活动
  Apistreetjointmeetingactivityinfo: "/api/street-joint-meeting-activity/info",
  // 组织机构详情
  Apiorgorginfo: "/api/org/org-info",
  // 获取指定父级下指定子集类型集合的组织列表
  Apiorgorgchildtypelist: "/api/org/child-type-list",
  // 楼栋党小组详情
  Apiorgorgbuildinginfo: "/api/org/building-info",
  // 社区活动详情
  Apiorgorgcommunityactivitydetail: "/api/org/community-activity-detail",
  // 项目统计
  Apistatisticsprojectstatistics: "/api/statistics/project-statistics",
  // 岗位统计
  Apistatisticspostjobhuntingstatistics: "/api/statistics/post-job-hunting-statistics",
  // 志愿统计
  Apistatisticsvolunteerstatistics: "/api/statistics/volunteer-statistics",
  // 党组成员统计
  Apistatisticspartyorgmemberstatistics: "/api/statistics/party-org-member-statistics",
  // 组织统计
  Apistatisticsorgstatistics: "/api/statistics/org-statistics",
  // 年龄统计
  Apistatisticsagestatistics: "/api/statistics/career-statistics",
  // 职业统计
  Apistatisticscareerstatistics: "/api/statistics/org-statistics",
  // 文化程度统计
  Apistatisticseducationallevelstatistics: "/api/statistics/educational-level-statistics",
  // 民族统计
  Apistatisticsethnicstatistics: "/api/statistics/ethnic-statistics",
  // 性别统计
  Apistatisticssexstatistics: "/api/statistics/sex-statistics",
  // 看实时在线用户数量统计
  Apistatisticsapprealtimestatistics: "/api/statistics/app-real-time-statistics",
  // 查看标准化区域树
  Apistatisticsareatree: "/api/statistics/area-tree",
  // 查看标准化数据
  Apistatisticsstandarddata: "/api/statistics/standard-data",
};

const request = {
  // 查看标准化数据
  GetApistatisticsstandarddata: function Apistatisticsstandarddata(params) {
    let ip = API.Apistatisticsstandarddata + "?areaUserId=" + params.areaUserId
    return get(ip, params);
  },
  // 查看标准化区域树
  GetApistatisticsareatree: function Apistatisticsareatree(params) {
    let ip = API.Apistatisticsareatree
    return get(ip, params);
  },
  // 看实时在线用户数量统计
  GetApistatisticsapprealtimestatistics: function Apistatisticsapprealtimestatistics(params) {
    let ip = API.Apistatisticsapprealtimestatistics + "?" + params.url
    return post(ip, params);
  },
  // 年龄统计
  GetApistatisticsagestatistics: function Apistatisticsagestatistics(params) {
    let ip = API.Apistatisticsagestatistics + "?community=" + params.community + "&grid=" + params.grid + "&street=" + params.street + "&year=" + params.year 
    return post(ip, params);
  },
  // 职业统计
  GetApistatisticscareerstatistics: function Apistatisticscareerstatistics(params) {
    let ip = API.Apistatisticscareerstatistics + "?community=" + params.community + "&grid=" + params.grid + "&street=" + params.street + "&year=" + params.year
    return post(ip, params);
  },
  // 文化程度统计
  GetApistatisticseducationallevelstatistics: function Apistatisticseducationallevelstatistics(params) {
    let ip = API.Apistatisticseducationallevelstatistics + "?community=" + params.community + "&grid=" + params.grid + "&street=" + params.street + "&year=" + params.year
    return post(ip, params);
  },
  // 民族统计
  GetApistatisticsethnicstatistics: function Apistatisticsethnicstatistics(params) {
    let ip = API.Apistatisticsethnicstatistics + "?community=" + params.community + "&grid=" + params.grid + "&street=" + params.street + "&year=" + params.year
    return post(ip, params);
  },
  // 性别统计
  GetApistatisticssexstatistics: function Apistatisticssexstatistics(params) {
    let ip = API.Apistatisticssexstatistics + "?community=" + params.community + "&grid=" + params.grid + "&street=" + params.street + "&year=" + params.year
    return post(ip, params);
  },
  // 组织统计
  GetApistatisticsorgstatistics: function Apistatisticsorgstatistics(params) {
    let ip = API.Apistatisticsorgstatistics + "?" + params.url
    return post(ip, params);
  },
  // 党组成员统计
  GetApistatisticspartyorgmemberstatistics: function Apistatisticspartyorgmemberstatistics(params) {
    let ip = API.Apistatisticspartyorgmemberstatistics + "?" + params.url
    return post(ip, params);
  },
  // 志愿统计
  GetApistatisticsvolunteerstatistics: function Apistatisticsvolunteerstatistics(params) {
    let ip = API.Apistatisticsvolunteerstatistics + "?" + params.url
    return post(ip, params);
  },
  // 岗位统计
  GetApistatisticspostjobhuntingstatistics: function Apistatisticspostjobhuntingstatistics(params) {
    let ip = API.Apistatisticspostjobhuntingstatistics + "?time=" + params.time
    return post(ip, params);
  },
  // 项目统计
  GetApistatisticsprojectstatistics: function Apistatisticsprojectstatistics(params) {
    let ip = API.Apistatisticsprojectstatistics
    return post(ip, params);
  },
  // 社区活动详情
  GetApiorgorgcommunityactivitydetail: function Apiorgorgcommunityactivitydetail(params) {
    let ip = API.Apiorgorgcommunityactivitydetail
    return post(ip, params);
  },
  // 楼栋党小组详情
  GetApiorgorgbuildinginfo: function Apiorgorgbuildinginfo(params) {
    let ip = API.Apiorgorgbuildinginfo + "?orgId=" + params.id
    return get(ip, params);
  },
  // 获取指定父级下指定子集类型集合的组织列表
  GetApiorgorgchildtypelist: function Apiorgorgchildtypelist(params) {
    let ip = API.Apiorgorgchildtypelist + "?parentId=" + params.id + "&types=" + params.types;
    return get(ip, params);
  },
  // 组织机构详情
  GetApiorgorginfo: function Apiorgorginfo(params) {
    let ip = API.Apiorgorginfo + "?orgId=" + params.id;
    return get(ip, params);
  },
  // 街道联系会议简介
  GetApistreetjointmeetingactivityinfo: function Apistreetjointmeetingactivityinfo(params) {
    let ip = API.Apistreetjointmeetingactivityinfo + "/" + params.id;
    return get(ip, params);
  },
  // 街道联系会议简介
  GetApistreetjointmeetinginfo: function Apistreetjointmeetinginfo(params) {
    let ip = API.Apistreetjointmeetinginfo + "/" + params.id;
    return get(ip, params);
  },
  // 单位简介-非公
  GetApinotpartyunitinfo: function Apinotpartyunitinfo(params) {
    let ip = API.Apinotpartyunitinfo + "/" + params.id;
    return get(ip, params);
  },
  // 政策文件
  GetApipolicydocinfo: function Apipolicydocinfo(params) {
    let ip = API.Apipolicydocinfo + "/" + params.id;
    return get(ip, params);
  },
  // 红领党建
  GetApiredpartybuildinginfo: function Apiredpartybuildinginfo(params) {
    let ip = API.Apiredpartybuildinginfo + "/" + params.id;
    return get(ip, params);
  },
  // 四支队伍
  GetApiteamworkinfo: function Apiteamworkinfo(params) {
    let ip = API.Apiteamworkinfo + "/" + params.id;
    return get(ip, params);
  },
  // 党建要问-新闻
  GetApipartybuildingnewsinfo: function Apipartybuildingnewsinfo(params) {
    let ip = API.Apipartybuildingnewsinfo + "/" + params.id + '?token=' + sessionStorage.getItem('TOKEN');
    return get(ip, params);
  },
  // 示范典型
  GetApidemonstrationtypicalinfo: function Apidemonstrationtypicalinfo(params) {
    let ip = API.Apidemonstrationtypicalinfo + "/" + params.id;
    return get(ip, params);
  },
  // 支部活动
  GetApibranchactivityinfo: function Apibranchactivityinfo(params) {
    let ip = API.Apibranchactivityinfo + "/" + params.id;
    return get(ip, params);
  },
  // 组织生活会
  GetApiorgfemeetinginfo: function Apiorgfemeetinginfo(params) {
    let ip = API.Apiorgfemeetinginfo + "/" + params.id;
    return get(ip, params);
  },
  // 民主生活会
  GetApidemocraticlifemeetinginfo: function Apidemocraticlifemeetinginfo(params) {
    let ip = API.Apidemocraticlifemeetinginfo + "/" + params.id;
    return get(ip, params);
  },
  // 三会一课
  GetApithreemeetonelessoninfo: function Apithreemeetonelessoninfo(params) {
    let ip = API.Apithreemeetonelessoninfo + "/" + params.id;
    return get(ip, params);
  },
  // 社会主义核心价值观
  GetApisocialistvaluesinfo: function Apisocialistvaluesinfo(params) {
    let ip = API.Apisocialistvaluesinfo + "/" + params.id;
    return get(ip, params);
  },
  // 党群新闻
  GetApipartynewsinfo: function Apipartynewsinfo(params) {
    let ip = API.Apipartynewsinfo + "/" + params.id;
    return get(ip, params);
  },
  // 岗位信息-人员匹配
  GetApipjobhuntinguserList: function ApipjobhuntinguserList(params) {
    let ip = API.ApipjobhuntinguserList + "/" + params.page + "/" + params.size + "?key=" + params.key;
    return post(ip, params);
  },
  // 岗位信息
  GetApipostinfo: function Apipostinfo(params) {
    let ip = API.Apipostinfo + "/" + params.id;
    return get(ip, params);
  },
  // 求职人员信息
  GetApijobhuntinguserinfo: function Apijobhuntinguserinfo(params) {
    let ip = API.Apijobhuntinguserinfo + "/" + params.id;
    return get(ip, params);
  },
  // 志愿项目
  GetApivolunteerprojectinfo: function Apivolunteerprojectinfo(params) {
    let ip = API.Apivolunteerprojectinfo + "/" + params.id;
    return get(ip, params);
  },
  // 清单管理
  GetApidemandistinfo: function Apidemandistinfo(params) {
    let ip = API.Apidemandistinfo + "/" + params.id;
    return get(ip, params);
  },
  // 获取便民服务信息
  GetApiconvenienceservicesinfo: function Apiconvenienceservicesinfo(params) {
    let ip = API.Apiconvenienceservicesinfo + "/" + params.id;
    return get(ip, params);
  },
  // 资源管理
  GetApiresourcelistinfo: function Apiresourcelistinfo(params) {
    let ip = API.Apiresourcelistinfo + "/" + params.id;
    return get(ip, params);
  },
  //
  Apiwebloginlogout: function Apiwebloginlogout(params) {
    return post(API.ApiwebloginlogoutPath, params);
  }
};
export default request;
